import { CardEditableParamsDefault, CardDataEditableParamsCommonDefault } from "@/views/card/js/data/cardDatas/card-datas-default.js";
import TooltipsData from "@/views/card/js/data/tooltipsData/tooltips-data.js";
const CARD_8 =  {
    bIs_title_show: {
      ...CardEditableParamsDefault.SwitchNormal,
      label: '编辑标题(是|否)',
      bIsUpdateManual: true,
      boolReplace: {
        boolTrue: '1',
        boolFalse: '0',
      },
    },
    title: {
      ...CardEditableParamsDefault.InputNormal,
      label: '大标题',
      placeholder: '请填入大标题',

      param_effect_parent: {
        effect_parent_keys: ['bIs_title_show'],
        effect_type: ['SHOW_HIDE'],
        effect_parent_val: '1',
        effect_clear: {
          effect_clear_default_val: '',
        },
      },
    },
    title_extra_text: {
      ...CardEditableParamsDefault.InputNormal,
      label: '副标题',
      placeholder: '请填入副标题',

      param_effect_parent: {
        effect_parent_keys: ['bIs_title_show'],
        effect_type: ['SHOW_HIDE'],
        effect_parent_val: '1',
        effect_clear: {
          effect_clear_default_val: '',
        },
      },
    },
    show_title_arrow: {
      ...CardEditableParamsDefault.SwitchNormal,
      label: '标题右侧箭头',
      bIsUpdateManual: true,
      boolReplace: {
        boolTrue: '1',
        boolFalse: '0',
      },

      param_effect_parent: {
        effect_parent_keys: ['bIs_title_show'],
        effect_type: ['SHOW_HIDE'],
        effect_parent_val: '1',
        effect_clear: {
          effect_clear_default_val: '0',
        },
      },
    },
    title_sub: {
      ...CardEditableParamsDefault.InputNormal,
      label: '正文标题',
      placeholder: '请填入正文标题',
    },
    // pic_ratio: {
    //   ...CardEditableParamsDefault.SliderNormal,
    //   label: '图片宽高比',
    //   step: 0.5,
    //   max: 4,
    //   min: 0,
    // },
    pic: {
      ...CardEditableParamsDefault.ImageNormal,
      label: '左图',
      res_type: 'String',  // Array : fileList, String : value
      placeholder: '尺寸严格按照设置的宽高，小于100kb，jpg,jpeg,png,gif格式',
      limit: 1,
      size: 100,
      accept: '.jpg, .jpeg, .png, .gif',
      // suffix: '_default',
      tooltips: TooltipsData.image[1],
    },
    pic_default: {
      ...CardEditableParamsDefault.ImageNormal,
      label: '左图(同上)',
      res_type: 'String',  // Array : fileList, String : value
      placeholder: '尺寸严格按照设置的宽高，小于100kb，jpg,jpeg,png,gif格式',
      limit: 1,
      size: 100,
      accept: '.jpg, .jpeg, .png, .gif',
      suffix: '_default',
      tooltips: TooltipsData.image[1] + TooltipsData.image[998],
    },
    desc1: {
      ...CardEditableParamsDefault.InputNormal,
      label: '正文内容一',
      placeholder: '请填入正文内容一',
    },
    desc1_icon: {
      ...CardEditableParamsDefault.ImageNormal,
      label: '内容一图标',
      res_type: 'String',  // Array : fileList, String : value
      placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
      limit: 1,
      size: 100,
      accept: '.png',
      tooltips: TooltipsData.image[0] + TooltipsData.CARD_8[2],
    },
    desc1_icon_default: {
      ...CardEditableParamsDefault.ImageNormal,
      label: '内容一图标(同上)',
      res_type: 'String',  // Array : fileList, String : value
      placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
      limit: 1,
      size: 100,
      accept: '.png',
      tooltips: TooltipsData.image[0] + TooltipsData.CARD_8[2] + TooltipsData.image[998],
    },
    desc1_max_line: {
      ...CardEditableParamsDefault.SliderNormal,
      label: '内容一行数',
      step: 1,
      max: 2,
      min: 0,
    },
    desc2: {
      ...CardEditableParamsDefault.InputNormal,
      label: '正文内容二',
      placeholder: '请填入正文内容二',
    },
    display_arrow: {
      ...CardEditableParamsDefault.SwitchNormal,
      label: '右侧箭头',
      bIsUpdateManual: true,
      boolReplace: {
        boolTrue: '1',
        boolFalse: '0',
      },
      tooltips: TooltipsData.CARD_8[0],
    },
    scheme: {
      ...CardEditableParamsDefault.InputNormal,
      label: '跳转链接',
      placeholder: '请填入跳转链接',
    },
    // openurl: {
    //   ...CardEditableParamsDefault.InputNormal,
    //   label: 'Card跳转链接',
    //   placeholder: '请填入Card跳转链接',
    // },
    bIs_right_pannel_show: {
      ...CardEditableParamsDefault.SwitchNormal,
      label: '支持标题扩展图片',
      bIsUpdateManual: true,
      boolReplace: {
        boolTrue: '1',
        boolFalse: '0',
      },
      tooltips: TooltipsData.CARD_8[1],
    },
    right_pannel: {
      ...CardEditableParamsDefault.Obj,
      label: '标题扩展图片',
      param_params: {
        flag_imgs: {
          ...CardEditableParamsDefault.ImageNormal,
          res_type: 'Array',  // Array : fileList, String : value
          label: '图片',
          placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
          limit: 9,
          size: 100,
          accept: '.png',
        },
        desc: {
          ...CardEditableParamsDefault.InputNormal,
          label: '描述',
          placeholder: '请填入描述',
        },
        middle_img: {
          ...CardEditableParamsDefault.ImageNormal,
          res_type: 'String',  // Array : fileList, String : value
          label: '中间扩展图片',
          placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
          limit: 1,
          size: 100,
          accept: '.png',
        },
      },

      param_effect_parent: {
        effect_parent_keys: ['bIs_right_pannel_show'],
        effect_type: ['SHOW_HIDE', 'CHANGE_PARAMS'],
        effect_parent_val: '1',
        effect_clear: {
          effect_clear_default_val: {},
        },
        effect_obj_params: [
          {
            effect_regular: new RegExp("^0$"),
            effect_new_obj_params: {},
          },
          {
            effect_regular: new RegExp("^1$"),
            effect_new_obj_params: {
              type: 2,
              flag_imgs: [],
              desc: '',
              middle_img: '',
            },
          },
        ],
      },
    },
    bIs_buttons_show: {
      ...CardEditableParamsDefault.SwitchNormal,
      label: '支持按钮',
      bIsUpdateManual: true,
      boolReplace: {
        boolTrue: '1',
        boolFalse: '0',
      },
      tooltips: TooltipsData.CARD_8[1],

      param_effect_parent: {
        effect_parent_keys: ['bIs_right_pannel_show'],
        effect_type: ['INIT'],
        effect_parent_val: '1',
        effect_clear: {
          effect_clear_default_val: '0',
        },
      },
    },
    buttons: {
      ...CardEditableParamsDefault.Lists,
      label: '右侧按钮',
      limit: 1,
      param_params: {
        name: {
          ...CardEditableParamsDefault.InputNormal,
          label: '按钮名称',
          placeholder: '请填入按钮名称',
          tooltips: TooltipsData.others[2],
        },
        pic: {
          ...CardEditableParamsDefault.ImageNormal,
          label: '按钮图标',
          res_type: 'String',  // Array : fileList, String : value
          placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
          limit: 1,
          size: 100,
          accept: '.png',
          tooltips: TooltipsData.image[5],
        },
        pic_default: {
          ...CardEditableParamsDefault.ImageNormal,
          label: '按钮图标(同上)',
          res_type: 'String',  // Array : fileList, String : value
          placeholder: '尺寸严格按照设置的宽高，小于100kb，png格式',
          limit: 1,
          size: 100,
          accept: '.png',
          suffix: '_default',
          tooltips: TooltipsData.image[6],
        },
        type: {
          ...CardEditableParamsDefault.DropdownNormal,
          label: '按钮类型',
          placeholder: '请选择按钮类型',
          valLists: [
            {
              name: '默认',  // 默认类型
              value: 'default',
            },
            {
              name: '链接',  // 默认类型
              value: 'link',
            },
          ],
        },
        params: {
          ...CardEditableParamsDefault.Obj,
          label: '按钮其他参数',
          param_params: {
            scheme: {
              ...CardEditableParamsDefault.InputNormal,
              label: '跳转链接',
              placeholder: '请选择跳转链接',
            },
            action: {
              ...CardEditableParamsDefault.Action,
              label: '按钮事件',
              placeholder: '请选择按钮事件',
            },
          },

          param_effect_parent: {
            effect_parent_keys: ['buttons', 'ARRAY_NUM', 'type'],
            effect_type: ['CHANGE_PARAMS'],
            effect_parent_val: '1',
            effect_clear: {
              effect_clear_default_val: {},
            },
            effect_obj_params: [
              {
                effect_regular: new RegExp("^link$"),
                effect_new_obj_params: {
                  scheme: '',
                },
              },
              {
                effect_regular: new RegExp("^default$"),
                effect_new_obj_params: {
                  action: '',
                },
              },
            ],
          },
        },
      },

      param_effect_parent: {
        effect_parent_keys: ['bIs_buttons_show'],
        effect_type: ['SHOW_HIDE', 'ADD_ITEM'],
        effect_parent_val: '1',
        effect_clear: {
          effect_clear_default_val: [],
        },
      },
    },
    ...CardDataEditableParamsCommonDefault,
  };
export default CARD_8;
